package com.w1.security.domain.Vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 自己改装的pageVo对象，核心是把records换成了Vo的list
 * @author mingyifan
 * @date 2022-01-26 14:10
 */
@Data
public class FindLikePageVo extends Page{
    public static FindLikePageVo trans(Page<?> page, List<?> list){
        FindLikePageVo vo = new FindLikePageVo();
        BeanUtils.copyProperties(page,vo);
        vo.setRecords(list);
        return vo;
    }
}
